<template>
	<view class="pbgf">
		<view class="p3432">
			<u--textarea v-model="remark" placeholder="请输入公告内容" count height='300rpx' maxlength='400'></u--textarea>

			<view class="mt60 btn bg2a7 cf fw500 fs26 flex_c" @click="submit">确定</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				remark: '', //备注
			}
		},
		onLoad() {
			this.shopIndex()
		},
		onShow() {

		},
		methods: {
			shopIndex() { //首页数据 公告内容
				this.$api.shopIndex().then(res => {
					if (res.code == 1) {
						this.remark = res.data.notice
					}
				})
			},
			submit() { //确定
				this.$api.shopEdit({
					notice: this.remark
				}).then(res => {
					if (res.code == 1) {
						uni.navigateBack()
					}
					uni.$u.toast(res.msg)

				})
			}
		},
		computed: {

		},
		watch: {

		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		height: 80upx;
		border-radius: 40upx;
	}
</style>
